package com.xky.microserviceconsumermovie.controller;

import com.xky.microserviceconsumermovie.domain.User;
import com.xky.microserviceconsumermovie.service.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author keying.xia
 * @date 2017/12/13
 */
@RestController
public class MovieController {

    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping(value = "/movie/{id}")
    public User findById(@PathVariable Long id){
        return userFeignClient.findById(id);
    }



}
